package com.yiwyn.validemo.controller;

import com.yiwyn.validemo.service.AService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@RestController
public class AController {
    @Autowired
    private AService aService;


    @GetMapping("/test")
    public String test(@Valid @NotNull String username) {
        return aService.test();
    }

}
